/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package p2a;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Chaker
 */
public class RulesTree {
    private int field;
    private ArrayList<Branch> branch_list;

    public RulesTree(int field) {
        this.field = field;
        this.branch_list = new ArrayList<Branch>();
    }
    
    public void setBranchList(ArrayList<Branch> branch_list)
    {
        this.branch_list = branch_list;
    }
    public ArrayList<Branch> getBranchList()
    {
        return branch_list;
    }
}

class Branch{
        private RulesTree node;
        private String value;
        private RuleAux rule;
        public Branch(RuleAux rule, int field, String value)
        {
            this.rule = rule;
            node = new RulesTree(field);
            this.value = value;
        }
        public String getValue()
        {
            return this.value;
        }
        public RulesTree getNode()
        {
            return this.node;
        }
        public RuleAux getRule()
        {
            return this.rule;
        }
        public String getAction()
        {
            return this.rule.getAction();
        }
    }

